import type { RouteRecordRaw } from 'vue-router'
import QuestionList from '../components/answerclub/QuestionList.vue'
import QuestionDetail from '../components/answerclub/QuestionDetail.vue'
import PersonalCenter from '../components/answerclub/PersonalCenter.vue'
import PostQuestion from '../components/answerclub/PostQuestion.vue' // 新增

// 修改为命名导出
export const questionRoutes: RouteRecordRaw[] = [
    {
        path: '/questions',
        name: 'QuestionList',
        component: QuestionList
    },
    {
        path: '/question/:id',
        name: 'QuestionDetail',
        component: QuestionDetail,
        props: true // 允许路由参数传递给组件props
    },
    {
        path: '/personal',
        name: 'PersonalCenter',
        component: PersonalCenter
    },
    {
        path: '/post-question',
        name: 'PostQuestion',
        component: PostQuestion
    }
]